package BankingTaskManagement;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class BankingService {
    private final BankingTaskManager taskManager = new BankingTaskManager();

    public void createAccount(String accountNumber, double initialBalance) {
        taskManager.createAccount(accountNumber, initialBalance, 0.0);
    }

    public boolean deposit(String accountNumber, double amount) {

        return taskManager.deposit(accountNumber, amount);
    }

    public boolean withdraw(String accountNumber, double amount) {
        return taskManager.withdraw(accountNumber, amount);
    }

    public double getBalance(String accountNumber) {
        BankAccount account = taskManager.accounts.get(accountNumber);
        return account != null ? account.getBalance() : 0.0;
    }

    public ArrayList<String> listHighPriorityTasks() {
        return taskManager.getHighPriorityTasks();
    }

    public ArrayList<String> listLowPriorityTasks() {
        return taskManager.getLowPriorityTasks();
    }

    public void addTask(String task)
    {
        taskManager.addTask(task);
    }

    public void removeTask(String priority, int index)
    {
        taskManager.removeTask(priority, index);
    }

    public void changePriority(String priority, int index) {
        taskManager.changePriority(priority, index);
    }
}